class message<T>{
  protected error!:number;
  private Message:string|null;
  private data:Array<T>|string;
  constructor(message:string|null,data:Array<T>|string){
    this.data = data
    this.Message = message
    // if(typeof data==="string") this.Message = null
  }
}
class errorMessage extends message<string>{
  constructor(message:string){
    super("失败",message)
    this.error = 0
  }
}
class successMessage extends message<Object>{
  constructor(data:Array<Object>|string="成功"){
    super("成功",data)
    this.error = -1
  }
}
export {successMessage,errorMessage}